﻿package mortal.game.view.combinedServer.data
{
    import Message.Game.*;
    import Message.Public.*;
    import mortal.game.cache.*;

    public class CombinedSerCache extends Object
    {
        public var rechargeInfo:SMergeRechargeActiveRewardInfo;
        private var _rankList:Array;
        public var openInfo:SMergeInfoMsg;
        public var recharge1000Info:SMergeRechargeReturnCashInfo;

        public function CombinedSerCache()
        {
            return;
        }// end function

        public function rechargBack(param1:int) : void
        {
            this.rechargeInfo.rewardInfo[param1] = 1;
            return;
        }// end function

        public function recharg1000Back(param1:int) : void
        {
            this.recharge1000Info.getTimes = param1;
            return;
        }// end function

        public function getRechrNum() : int
        {
            return Cache.instance.rebate.rechargeSum;
        }// end function

        public function get rankList() : Array
        {
            return this._rankList;
        }// end function

        public function set rankList(param1:Array) : void
        {
            this._rankList = param1;
            this.checkAndAddNo1();
            return;
        }// end function

        public function checkAndAddNo1() : void
        {
            var _loc_4:SToplist = null;
            var _loc_1:* = this._rankList;
            if (_loc_1 == null || _loc_1.length == 0)
            {
                return;
            }
            var _loc_2:Boolean = false;
            var _loc_3:Boolean = false;
            var _loc_5:int = 0;
            while (_loc_5 < _loc_1.length)
            {
                
                _loc_4 = _loc_1[_loc_5];
                if (_loc_4.rank == 1 || _loc_4.rank == -1)
                {
                    _loc_2 = true;
                }
                if (_loc_4.rank == 11)
                {
                    _loc_1.splice(_loc_5);
                    break;
                }
                _loc_5++;
            }
            if (_loc_2 == false)
            {
                _loc_4 = new SToplist();
                _loc_4.rank = -1;
                _loc_1.unshift(_loc_4);
            }
            return;
        }// end function

    }
}
